Follow links through baselines

Hello all,

I'm trying to find out all links between two modules through baselines.

 

In my case I have:

module A baseline 1.0 object 1 ->module B baseline 1.1 object 20

module A baseline 2.0 object 1 ->module B baseline 1.2 object 30 (object 20 is deleted).

 

If I run the code bellow from Module A baseline 1.0, it prints 20, if I run it from module A baseline 2.0, it prints 30. That is working.

But I would want to print the baseline max and min numbers of the destination module.

Link iLnk
Module m = current Module
Object oNewObj
for oNewObj in m do {
for iLnk in all (oNewObj->"*") do {
    sourceMod = source iLnk
    Object sourceObj = source(iLnk)
    string modPrefix = identifier sourceObj
    
    print modPrefix "\n"
}
}

 

How can I find out all the information of each link ?

 

 


Estebell - Thu Mar 30 05:39:47 EDT 2017

Re: Follow links through baselines
Mathias Mamsch - Thu Mar 30 08:41:53 EDT 2017

I figure you are using baseline sets, otherwise this would probably not work? 

You can get the version of the module (so its baseline, etc.) using the ModuleVersion sourceVersion(Link) and ModuleVersion targetVersion(Link) perms. 

Don't forget to cleanup the ModuleVersions after extracting the version from them. Hope this helps, Regards, Mathias